package com.medvalley.tcm.dao;

import com.medvalley.tcm.domain.YangShengEat;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface YangShengEatDao extends JpaRepository<YangShengEat, Long>, JpaSpecificationExecutor<YangShengEat> {

    YangShengEat findOneByDietNameAndStatus(String dietName, int status);

    Page<YangShengEat> findAllByStatus(Pageable pageable, int status);

    List<YangShengEat> findAllByIdIn(List<Long> ids);

    List<YangShengEat> findAllByDietNameIn(List<String> dietNames);

}
